package com.mc.cloud.mall.categoryProduct.model.mapper;

import com.mc.cloud.mall.categoryProduct.model.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@Mapper
public interface CategoryMapper {
    
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);
    
    Category selectByName(String name);
    
    List<Category> selectList();
    
    List<Category> selectCategoriesByParentId(Integer parentId);
}